﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Web;

namespace WCLOnlineExam.Models
{
    public class DataContext : DbContext
    {
        public DbSet<User> User { get; set; }
        
        public DbSet<UserGroup> UserGroup { get; set; }

        public DbSet<Question> Question { get; set; }

        public DbSet<Exam> Exam { get; set; }

        public DbSet<QuestionCopy> QuestionCopy { get; set; }

        public DbSet<ExamResult> ExamResult { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();//移除复数表名的契约
        }
    }

}